<?php 	$host  = $_SERVER['HTTP_HOST'];	if ($_SERVER['SERVER_NAME'] == 'localhost'){$uri="/kalender";}else{$uri="";}	if (!is_object($bd)){			//me conecto a la base de datos		require("../globals/Db.class.php");		require("../globals/Conf.class.php");		$bd=Db::getInstance();		}	$numFact = $bd->san($_POST["numFact"]);		$query = "select max(numero) as max from facturas";	//echo($query);	$result = $bd->eje($query);	$maxNumFact = $bd->fila($result,0);		$string_to_return = "";	if(intval($maxNumFact["max"]) >= intval($numFact)){		$string_to_return = "msg:nok##".$maxNumFact["max"];	}else{		$string_to_return = "msg:ok";	}	echo($string_to_return);?>
